package com.own.business.wallet.business.entity;

import lombok.Getter;

import java.io.Serializable;

/**
 * WalletOrderNoInfo
 *
 * @author chenxueli
 * @date 2024-02-29 09:21:00
 */
@Getter
public class WalletOrderNoInfo implements Serializable {

    /**
     * 前缀
     */
    private final String prefix;

    /**
     * 订单类型
     */
    private final String type;

    /**
     * 日期
     */
    private final String date;

    /**
     * 自增序号
     */
    private final String number;

    /**
     * 随机字符串
     */
    private final String random;

    public WalletOrderNoInfo(String orderNo) {
        this.prefix = orderNo.substring(0, 3);
        this.type = orderNo.substring(3, 5);
        this.date = orderNo.substring(5, 13);
        this.number = orderNo.substring(13, 17);
        this.random = orderNo.substring(17);
    }

}
